/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.strategy;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/15 22:52
 */

// 把策略封装起来
public class Context {
    private IStrategy strategy = null;

    public Context(IStrategy strategy){
        this.strategy = strategy;
    }

    public  void run(){
        this.strategy.strate();
    }
}
